#region Imported Namespaces
using System;
using System.Collections.Specialized;
using System.Data;
using System.Web.UI.WebControls;

using PHSRAG.Insight21.Context;
using BO = PHSRAG.Insight21.BusinessObjects;
using DataAccess = PHSRAG.Utility.DataAccess;
using ICachePolicy = PHSRAG.Insight21.Policy.ICachePolicy;
using GenerateKey = PHSRAG.Insight21.BusinessObjects.ModuleKey;
#endregion

namespace PHSRAG.Insight21.SearchContext
{
	/// <summary>
	/// Summary description for HumansSeachContext.
	/// </summary>
	public class HumansSearchContext: SearchContext
	{
		#region Constants
		private static string HumansSearchContextKey = GenerateKey.MakeKey("HumansSearchContext_3CD3C238-C3DA-409b-ABE2-2A02B4BFB1EF",GenerateKey.Humans);
		#endregion

		#region Constructor
		/// <summary>
		/// Create an instance of the HumansSearchContext class. Since this object does not hold any state 
		/// (other than whatever the base class holds), there is nothing to initialize.
		/// </summary>
		/// <param name="cachePolicy">Cache policy to use</param>
		public HumansSearchContext(ICachePolicy cachePolicy) : base(cachePolicy)
		{
			DataContainer = new DataSet();
		}

		#endregion

		#region Class Properties
		/// <summary>
		/// Get the key to be used in all caching operations for this instance of the object.
		/// </summary>
		public static string CacheKey	{ get { return HumansSearchContextKey; } }

		#endregion

		#region Overrides
		/// <summary>
		/// Adds the HumansSearchContext object to the cache
		/// </summary>
		public override void Cache()
		{
			CachePolicy.Cache(CacheKey, this);
		}

		/// <summary>
		/// Removes the HumansSearchContext object from the cache
		/// </summary>
		public override void UnCache()
		{
			CachePolicy.UnCache(CacheKey);
		}

		/// <summary>
		/// Load humans search data for any drop-down lists into the data container.
		/// Currently, does nothing since there are no drop-down lists
		/// </summary>
		/// <param name="connectionString">Connection string to the database</param>
		/// <param name="args">Arugments to the invoked stored procedure</param>
		public override void Load(string connectionString, params object[] args)
		{

		}
		#endregion

		#region SearchContext Members
		/// <summary>
		/// Reset the internal search state.
		/// </summary>
		public override void Reset(string pageName)
		{
			DataContainer.Reset();
		}
		#endregion
	}
}
